<template>
  <router-view></router-view>
  <alert :show.sync="isAlert" button-text="确定" title="提示" @on-hide="hideCb">{{showText}}</alert>
</template>

<script>
  export default {
    name: 'App',
    components: {
      Alert: require('vux/dist/components/Alert')
    },
    data () {
      return {
        hideCb: function () {
          console.log(this);
        },
        showText: '操作成功',
        isAlert: false
      };
    },
    created () {
      let that = this;
      this.$on('alert', function (text, cb) {
        that.isAlert = true;
        that.showText = text;
        that.hideCb = cb || function () {};
      });
      this.$on('alert.close', function () {
        that.isAlert = false;
      });
    }
  };
</script>
<style>
  .weui_dialog_title{
    font-size: .7rem;
    color:#707070;
  }
  .weui_dialog_bd {
    font-size: .8rem;
    color:#363941;
  }
  .weui_dialog_ft{
    font-size: .6rem;
    line-height: 3.4;
    margin-top: .6rem;
  }
  .weui_btn_dialog.primary{
    color:#45d8ba;
  }
  .vux-slider .vux-indicator-right>a>.vux-icon-dot.active, .vux-slider>.vux-indicator>a>.vux-icon-dot{
    width: .3rem;
    height: .3rem;
    border-radius: 100000rem;
  }
  .vux-slider .vux-indicator-right>a>.vux-icon-dot.active, .vux-slider>.vux-indicator>a>.vux-icon-dot.active{
    color:#45d8ba;
  }
</style>
